#!/bin/sh
#
# Clean up
#
n=0
while [ "x$1" != "x" ]; do
	n=$(($n + 1))
	if [ $n -gt 2 ]; then
	  exit 0
        fi
	case "$1" in
	  -d) rm -f data/*.out data/*.err ;;
	  -j) rm -f job*.pbs run*.app ;;
	  -h) printf "usage: clean [-d|-j]\n";
	      printf "  -d = data directory\n";
	      printf "  -j = .pbs and .app files\n" ;
	      exit 0;;
	esac
	shift
done
rm -f *.err *.out
rm -f data/rabbitmq-server.host
rm -f erl_crash.dump
